﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SPVSX.Explorer.Extensions.Dialogs
{
    public partial class DeveloperDashboardSettingsDialog : Form
    {
        public string SelectedLevel
        {
            get;
            set;
        }

        public DeveloperDashboardSettingsDialog()
        {
            InitializeComponent();
        }

        private void DeveloperDashboardSettingsDialog_Load(object sender, EventArgs e)
        {
            if (SelectedLevel.ToLower() == "off")
            {
                radDisplayLevelOff.Checked = true;
            }
            if (SelectedLevel.ToLower() == "ondemand")
            {
                radDisplayLevelOnDemand.Checked = true;
            }

            if (SelectedLevel.ToLower() == "on")
            {
                radDisplayLevelOn.Checked = true;
            }
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            if (radDisplayLevelOff.Checked)
            {
                SelectedLevel = "Off";
            }

            if (radDisplayLevelOnDemand.Checked)
            {
                SelectedLevel = "OnDemand";
            }

            if (radDisplayLevelOn.Checked)
            {
                SelectedLevel = "On";
            }
        }
    }
}
